Skip to content

Conversation

@Mathieu-Deharbe
Copy link
Contributor

  • adds a name to the composite modifications
  • updates the composite creation endpoint

needs : gridsuite/network-modification#156

Mathieu-Deharbe and others added 5 commits February 6, 2026 14:46
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Meklo Meklo self-requested a review February 11, 2026 16:14
Copy link
Contributor

@Meklo Meklo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evolving ModificationInfos to include composite subModification and its name in the message values will be done later ?

Additionally I've noticed when using INSERT_COMPOSITE it create two new entries in composite_modification table which corresponds to two modifications, one with the targetted group_uuid and one with a blank group_uuid, is this intended or a mishap on my side ?

MOVE,
COPY,
SPLIT_COMPOSITE, // the network modifications contained into the composite modifications are extracted and inserted one by one
INSERT_COMPOSITE // the composite modifications are fully inserted as composote modifications
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Comment on lines +3 to +6
<changeSet author="deharbemat (generated)" id="1770384121049-15">
<addColumn tableName="composite_modification">
<column name="composite_name" type="varchar(255)"/>
</addColumn>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no issue if it hasn't a default name for preexisting composite modifications ?

@Parameter(description = "the modification Uuid to move before (MOVE option, empty means moving at the end)") @RequestParam(value = "before", required = false) UUID beforeModificationUuid,
@Parameter(description = "origin group UUID, where modifications are copied or cut") @RequestParam(value = "originGroupUuid", required = false) UUID originGroupUuid,
@Parameter(description = "modifications can be applied (default is true)") @RequestParam(value = "build", required = false, defaultValue = "true") Boolean canApply,
@Parameter(description = "composite modifications names") @RequestParam(value = "compositeNames", required = false) List<String> compositeNames,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be added to modificationContextInfos ? Like do you think it would be possible to replace List from the Pair to a list of records/dto containing UUID and their coresponding compositeName ?
compositeName would be optional to keep the system working for copying non composite modifications

@NonNull List<UUID> compositeModificationsUuids,
@NonNull List<String> compositeNames) {
List<CompositeModificationEntity> newCompositeModifications = new ArrayList<>();
for (int i = 0; i < Math.min(compositeNames.size(), compositeModificationsUuids.size()); i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be a discrepancy between UUIDs and names amount ?

@NonNull List<String> compositeNames) {
List<CompositeModificationEntity> newCompositeModifications = new ArrayList<>();
for (int i = 0; i < Math.min(compositeNames.size(), compositeModificationsUuids.size()); i++) {
UUID newCompositeModificationUuid = cloneCompositeModification(compositeModificationsUuids.get(i), compositeNames.get(i)); // ici c'est fait orderonné par modification order plutôt que UUID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better translate the comment in english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants